package com.compmov.socialnetwork;

import android.app.TabActivity;
import android.content.Intent;
import android.content.res.Resources;
import android.os.Bundle;
import android.widget.TabHost;

public class PerfilAmigo extends TabActivity  {
    /** Called when the activity is first created. */
    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.detalles);
        Resources res = getResources(); 
        TabHost tabHost = getTabHost();  
        TabHost.TabSpec spec;  
        
        Bundle bundle = getIntent().getExtras();
        int idPer=0;
		if (bundle != null) {
			idPer=bundle.getInt("idPer");
		}
        // Create an Intent to launch an Activity for the tab (to be reused)
		Intent intent = new Intent().setClass(this, DatosPersona.class);
        intent.putExtra("idPer", idPer);
		
        spec = tabHost.newTabSpec("Perfil").setIndicator("Perfil",
                          res.getDrawable(R.drawable.perfil))
                      .setContent(intent);        
        tabHost.addTab(spec);
       

        Intent intent2 = new Intent().setClass(this, PlacesAdded.class);
        spec = tabHost.newTabSpec("Lugares").setIndicator("Lugares",
                          res.getDrawable(R.drawable.googlemaps))
                      .setContent(intent2);
        intent2.putExtra("idPer", idPer);
        
        tabHost.addTab(spec);
        
       

        tabHost.setCurrentTab(0);
    }

}